package com.jiepu.daily.corejava.advanceed.part1.day0715;

/**
 * @Description:
 * @author: xinjie.txt
 * @date: 2020/7/15  10:10
 */
public class StrDemo {
	static class Student {
		String gender;

		public Student(String gender) {
			this.gender = gender;
		}
	}

	static class Teacher {
		String gender;

		public Teacher(String gender) {
			this.gender = gender;
		}
	}

	public static void main(String[] args) {
		Student student = new Student("man");
		Student student2 = new Student("woman");
		Teacher teacher = new Teacher("woman");
		System.out.println(student2.gender==teacher.gender);
		System.out.println(teacher.gender);
		System.out.println(student2.gender);

		student2.gender="manmanman";

		System.out.println(student2.gender==teacher.gender);
		System.out.println(teacher.gender);
		System.out.println(student2.gender);
	student.gender.intern();
	}
}
